<template>
  <div>
    <p>年龄：{{ age }}</p>
    <button @click="changAge">让你飞起来</button>
    <hr />
    <p>{{ person }}</p>
    <button @click="changpersonage">你也一起飞</button>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const age = ref(18)
console.log(age)
const changAge = () => {
  age.value++
}
const person = ref({
  name: '张三',
  age: 18
})
const changpersonage = () => {
  person.value.age++
}
</script>
